package com.test.burnincash.activity_fragment_burnin.fragment_burnin;

import android.annotation.SuppressLint;
import android.os.Bundle;

import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.test.burnincash.R;
import com.test.burnincash.activity_fragment_burnin.base_burnin.BaseLoanFragment_burnin;
import com.test.burnincash.bean_burnin.config_info_burnin.AppShowInfo_burnin;
import com.test.burnincash.bean_burnin.process_burnin.ProcessInfo_burnin;
import com.test.burnincash.util_burnin.http_burnin.HttpManager_burnin;


public class LoanFailFragment_burnin extends BaseLoanFragment_burnin {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_loan_fail_burnin, container, false);
        init_burnin(view);
        return view;
    }

    @SuppressLint("SetTextI18n")
    private void init_burnin(View view){

        TextView textTv = view.findViewById(R.id.fragment_loan_fail_tv_text);

        view.findViewById(R.id.fragment_loan_fail_layout_refresh_status).setOnClickListener(v -> HttpManager_burnin.getInstance().requestUserProcess());
        String days = ProcessInfo_burnin.getInstance().getDeniedBetweenDay();
        if (TextUtils.isEmpty(days)) days = AppShowInfo_burnin.getInstance().getRejectPeriod();
        textTv.setText(getString(R.string.fragment_loan_fail_text_1)+ days + getString(R.string.fragment_loan_fail_text_2));
    }
}